import Vue from 'vue'

import Index from '@/views/Index.vue'
import News from '@/views/News.vue'
import Sports from '@/views/Sports.vue'

import SportsIndex from '@/views/second/SportsIndex.vue'
import SportsDomestic from '@/views/second/SportsDomestic.vue'
import SportsAbroad from '@/views/second/SportsAbroad.vue'

import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Index,
    },
    {
      path: '/index',
      component: Index,
    },
    {
      path: '/news',
      component: News,
    },
    {
      path: '/sports',
      component: Sports,
      children: [
        {
          path: '/sportsIndex',
          component: SportsIndex,
        },
        {
          path: '/sportsDomestic',
          component: SportsDomestic,
        },
        {
          path: '/sportsAbroad',
          component: SportsAbroad,
        },
      ],
    },
  ],
})

export default router
